/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.school.entity;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 学校Entity
 * @author xb.han
 * @version 2015-11-04
 */
public class School extends DataEntity<School> {

	private static final long serialVersionUID = 1L;
	private int id;
	private String schoolName;
	private String schoolLink;
	private String schoolAddress;
	private String schoolPhone;
	private String schoolOperator;
	/*
	* 以下为教育局监管学校属性*/
	private int totalBooks;//图书馆总藏书量
	private int borrowedBooks;//已经借出的数量总本数
	private int totalStudents;//学校总学生数
	private int totalTeachers;//学校总老师数
	private int totalReaders;//学校总读者人数

	public School(){
		super();
	}
	public School(String id){
		super(id);
	}

	public String getSchoolName(){
		return schoolName;
	}

	public void setSchoolName(String schoolName){
		this.schoolName = schoolName;
	}

	public String getSchoolLink(){
		return schoolLink;
	}

	public void setSchoolLink(String schoolLink){
		this.schoolLink = schoolLink;
	}

	public String getSchoolAddress(){
		return schoolAddress;
	}

	public void setSchoolAddress(String schoolAddress){
		this.schoolAddress = schoolAddress;
	}

	public String getSchoolPhone(){
		return schoolPhone;
	}

	public void setSchoolPhone(String schoolPhone){
		this.schoolPhone = schoolPhone;
	}

	public String getSchoolOperator(){
		return schoolOperator;
	}

	public void setSchoolOperator(String schoolOperator){
		this.schoolOperator = schoolOperator;
	}

	public int getTotalBooks(){
		return totalBooks;
	}

	public void setTotalBooks(int totalBooks){
		this.totalBooks = totalBooks;
	}

	public int getBorrowedBooks(){
		return borrowedBooks;
	}

	public void setBorrowedBooks(int borrowedBooks){
		this.borrowedBooks = borrowedBooks;
	}

	public int getTotalStudents(){
		return totalStudents;
	}

	public void setTotalStudents(int totalStudents){
		this.totalStudents = totalStudents;
	}

	public int getTotalTeachers(){
		return totalTeachers;
	}

	public void setTotalTeachers(int totalTeachers){
		this.totalTeachers = totalTeachers;
	}

	public int getTotalReaders(){
		return totalReaders;
	}

	public void setTotalReaders(int totalReaders){
		this.totalReaders = totalReaders;
	}

	@Override
	public boolean equals(Object o){
		if(this == o) return true;
		if(o == null || getClass() != o.getClass()) return false;

		School that = (School)o;

		if(id != that.id) return false;
		if(schoolName != null ? !schoolName.equals(that.schoolName) : that.schoolName != null) return false;
		if(schoolLink != null ? !schoolLink.equals(that.schoolLink) : that.schoolLink != null) return false;
		if(schoolAddress != null ? !schoolAddress.equals(that.schoolAddress) : that.schoolAddress != null) return false;
		if(schoolPhone != null ? !schoolPhone.equals(that.schoolPhone) : that.schoolPhone != null) return false;
		if(schoolOperator != null ? !schoolOperator.equals(that.schoolOperator) : that.schoolOperator != null) return false;

		return true;
	}

	@Override
	public int hashCode(){
		int result = id;
		result = 31 * result + (schoolName != null ? schoolName.hashCode() : 0);
		result = 31 * result + (schoolLink != null ? schoolLink.hashCode() : 0);
		result = 31 * result + (schoolAddress != null ? schoolAddress.hashCode() : 0);
		result = 31 * result + (schoolPhone != null ? schoolPhone.hashCode() : 0);
		result = 31 * result + (schoolOperator != null ? schoolOperator.hashCode() : 0);
		return result;
	}
}